import styles from "./AppHeaderComponent.module.scss"
import React, { useEffect, useState } from "react";
import bgImg from "@/assets/image/paget-title-head.png"
import { getTime, getWeek } from '../../utils/getTime';
import { Button } from 'antd';
import {
    FormOutlined
} from '@ant-design/icons';
function AppHeaderComponent({ showDrawer = Function }) {

    const [str, setStr] = useState("")
    const getDateTime = () => {
        setInterval(() => {
            const temp = getTime()
            setStr(temp)
        }, 1000)
    }

    const [week, setWeek] = useState(getWeek())
    useEffect(() => {
        getDateTime()

    }, [])

    const open = () => {
        showDrawer()
    }
    return (
        <>
            <div className={styles.header}>
                <div className="back">
                    <div className="back-image">
                        车商业务看板
                    </div>

                </div>
                <div className='btn' >
                    <Button style={{ color: "white", fontWeight: "600" }} icon={<FormOutlined />} onClick={() => open()} type="link" ghost>筛选条件</Button>
                </div>
                
            </div>
        </>
    )
}
export default AppHeaderComponent;